<?php
// +----------------------------------------------------------------------
// | ZanPianCMS
// +----------------------------------------------------------------------
// | Copyright (c) 2013 http://www.zanpiancms.com All rights reserved.
// +----------------------------------------------------------------------
// | BBS:  <http://www.zanpiancms.cc>
// +----------------------------------------------------------------------
namespace app\locoy\controller;
use app\locoy\common\Locoy;
class Vod extends Locoy{  
    public function Add(){
	if ($this->request->instance()->isPost()){
		$data   = input('post.');
		if(!is_int($data['vod_cid'])){
		    $data['vod_cid']=$this->getapilist($data['vod_cid'],'list_name','list_id',1);	
		}
		$data['vod_play']=trim($data['vod_play'],'$$$');
		$data['vod_url'] = implode(chr(13),explode("%0d%0a",trim($data['vod_url'])));		
		$status=vod_insert($data);
		if($status['code']>=1){
            return "成功";			
		}else{
			return "失败".$status['msg'];
		}	
	  }
    }
}
require APP_PATH.'common/library/Insert.php';